package cn.changeforyou.tcpIp.analysis.demo.protocol.gbt32960_3;

import io.netty.util.AsciiString;

/**
 * 加密方式
 *
 * @author zhyu
 * @date 2020/8/7 12:10
 */
public enum Encryption_scheme {
    nono("数据不加密", new AsciiString("01")),

    ;

    private String describle;
    private AsciiString word;

    Encryption_scheme(String describle, AsciiString word) {
        this.describle = describle;
        this.word = word;
    }

    public static Encryption_scheme getByWord(CharSequence word) {
        if (null == word) {
            return null;
        }
        Encryption_scheme[] values = Encryption_scheme.values();
        for (Encryption_scheme value : values) {
            if (value.word.equals(word)) {
                return value;
            }
        }
        return null;
    }

    public String getDescrible() {
        return describle;
    }

    public AsciiString getWord() {
        return word;
    }
}
